<?php

return [
    'SERVER_NAME' => "EasySwoole",
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT' => 9101,
        'SERVER_TYPE' => EASYSWOOLE_WEB_SOCKET_SERVER, //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER,EASYSWOOLE_REDIS_SERVER
        'SOCK_TYPE' => SWOOLE_TCP,
        'RUN_MODEL' => SWOOLE_PROCESS,
        'SETTING' => [
            'worker_num' => 6,
            'max_request' => 5000,
            'reload_async' => true,
            'max_wait_time'=>3,
            'enable_static_handler'=>true, //开启静态资源处理 1
            "static_handler_locations" => ['/Upload'],
            'document_root'=>'/www/wwwroot/dm',  //静态资源目录,
            'log_file'=> '/www/wwwroot/dm/Log/runtime.log'

        ],
        'TASK'=>[
            'workerNum'=>4,
            'maxRunningNum'=>2000,
            'timeout'=>15
        ]
    ],'MYSQL' => [
        'host'          => '127.0.0.1',
        'port'          => '3306',
        'user'          => 'root',
        'timeout'       => '30',
        'charset'       => 'utf8mb4',
        'password'      => '7276e06d26ce0aa2',
        'database'      => 'video',
        'pool_max_num'  => '3000',
        'pool_min_num'  => '5',
        'interval_check_time'=> 30,
        'POOL_TIME_OUT' => '5',
    ],
    'MYSQL_SLAVE' => [
        'host'          => '127.0.0.1',
        'port'          => '3306',
        'user'          => 'root',
        'timeout'       => '30',
        'charset'       => 'utf8mb4',
        'password'      => '7276e06d26ce0aa2',
        'database'      => 'video', //
        'pool_max_num'  => '3000',
        'pool_min_num'  => '5',
        'interval_check_time'=> 30,
        'POOL_TIME_OUT' => '5',
    ],

    'ES' => [
        'host'          => '127.0.0.1',
        'port'          => '9200',
    ],
    'REDIS' => [
        'host'          => '127.0.0.1',
        'port'          => '6379',
        'auth'          => '',
        'pool_max_num'  => '1000',
        'pool_min_num'  => '5',
        'POOL_TIME_OUT' => '0.1',
        'interval_check_time'=> 30,
        'db_index'=> 1,
    ],
    'TEMP_DIR' => null,
    'LOG_DIR' => null,
    //免token认证1
    'pass_route' => [
        '/v1/clearWatermark',
    ],

    //免签名认证1
    'pass_sign_route' => [

        '/v1/clearWatermark',

    ],
    //token
    'token'      => 'ee21e0656d161593170c7a7c18a2a21b',
    //盐值
    'salt'      => 'c71e1d235fb51a3033598a534844a698',
    //七牛云存储域名
    'oss_host' => "https://xxx/",
    //七牛云accessKey
    'qiniu_access_key' => "xxx",
    //七牛云secretKey
    'qiniu_secret_key' => "xxx",
    //七牛云空间名
    'qiniu_bucket' => 'xxxx',

    'system_upload'=> [
        'path'=> '/Upload/system/',
        'size'=> 1024*1024*2,
        'ext'=> ['image/jpeg','image/jpg','image/png']
    ],
    'down_qrcode'=> [
        'path'=> '/Upload/down_qrcode/',
        'size'=> 1024*1024*2,
        'ext'=> ['image/jpeg','image/jpg','image/png']
    ],
    'officialAccount_qrcode'=> [
        'path'=> '/Upload/officialAccount_qrcode/',
        'size'=> 1024*1024*2,
        'ext'=> ['image/jpeg','image/jpg','image/png']
    ],
    //腾讯地图
    'tx_map'=> [
        'key' => 'xxxxx'
    ],
    //助通短信1
    'ZtSms'=> [
        "username"=> 'xxx',
        "password"=> 'xxx',
        'sign'  => 'xxxxx'
    ],
    //新短信
    'Sms'=> [
        "appkey"=> 'xxx',
        "appCode"=> 'xxx',
        'appSecret'  => 'xxx',
        'sign'  => 'xxxx'
    ],
    //阿里短信
    'alSms'=> [
        "appkey"=> 'xxxx',
        "TemplateCode"=> 'xxxx',
        'appSecret'  => 'xxxxx',
        'sign'  => 'xxxxx'
    ],
    'JWT'=> [
        'Alg' => 'HMACSHA256',
        'Iss' => 'sjrw',
        'Sub' => ['admin'=> 'admin' ,'front'=> 'front'],
    ],
    'ipAccessCount'=>[
        'interval' => 5,//间隔5
        'count' => 20,//请求次数1
        'shield' => 3600,//屏蔽时间秒
    ]
];
